<?php 
//首页
require_once('./function.php');
require_once('./Connect2.1/qqConnectAPI.php');
 ?>
 <!doctype html>
 <html lang="en">
 <head>
 	<meta charset="UTF-8">
 	<title>Document</title>
 </head>
 <body>
 	<?php if(isset($_COOKIE['qq_accesstoken'])&&isset($_COOKIE['qq_openid'])){	?>
 	<a href="logout.php">退出qq</a>
 	<?php 
 		//实例化qc类,打印信息出来
 		$qc=new QC($_COOKIE['qq_accesstoken'],$_COOKIE['qq_openid']);
 		$userinfo=$qc->get_user_info();
 		debug($userinfo);
	}else{ ?>
	<a href="login.php">登录qq</a>
 	<?php } ?>
 </body>
 </html>